<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<x:parse xml="${param.xmlstr}" var="xmlData" />
 <input type="hidden" name="constructions/construction[0]/sequence_no" value="1" >
<input type="hidden" name="constructions/construction[0]@submit_org" value="1" >
<div class="t_bar">主承建单位基本情况</div>
<table class="t_css" width="100%" border="0" cellpadding="0"
	id="orgInfo1" cellspacing="1">
	<tr>
		<td width="20%" align="right" nowrap><span class="color_red">*</span>单位名称：</td>
		<td colspan="3">
		<input id="corgName" name="constructions/construction[0]/org_name" onchange="setOrgName();" label="单位名称" type="text" required class="input_css required "  style="width: 725px;" maxlength="100" value="<x:out select="$xmlData/data/constructions/construction[@submit_org='1']/org_name" />"/>
		</td>
	</tr>
	<tr>
		<td align="right" nowrap width="20%"><span class="color_red">*</span>企业所属地区：</td>
		<td width="30%">
		<input name="constructions/construction[0]/area_name" label="企业所属地区" type="text" required class="input_css required " maxlength="100" value="<x:out select="$xmlData/data/constructions/construction[@submit_org='1']/area_name" />"/>
		</td>
		<td align="right" width="20%"><span class="color_red">*</span>组织机构代码：</td>
		<td width="30%">
		<input name="constructions/construction[0]/org_no" label="组织机构代码" type="text" required class="input_css required orgCard" maxlength="100" value="<x:out select="$xmlData/data/constructions/construction[@submit_org='1']/org_no" /> "/>
		</td>
	</tr>
	<tr>
		<td align="right"><span class="color_red">*</span>营业执照注册号：</td>
		<td>
		<input name="constructions/construction[0]/org_licence" label="营业执照注册号" type="text" required class="input_css required " maxlength="100" value="<x:out select="$xmlData/data/constructions/construction[@submit_org='1']/org_licence" />"/>
		</td>
		<td align="right"><span class="color_red">*</span>税务登记号：</td>
		<td>
		<input name="constructions/construction[0]/tax_local_no" label="税务登记号" type="text" required class="input_css required " maxlength="100" value="<x:out select="$xmlData/data/constructions/construction[@submit_org='1']/tax_local_no" />"/>
		</td>
	</tr>
	<tr>
	        <td align="right"><span class="color_red">*</span>注册资本：</td>
            <td colspan="1" align="left">         
            <input name="constructions/construction[0]/registe_fund" type="text"  class=" required"  size="8" label="注册资本"
	       value="<x:out select="$xmlData/data/constructions/construction[@submit_org='1']/registe_fund" />" onfocus="InitInput.setNumber(this,7,4,2)" style="text-align:right;"/>
	        &nbsp;万&nbsp;
	        <c:set var="registe_fund_money_value"><x:out select="$xmlData/data/constructions/construction[@submit_org='1']/registe_fund_money_value" /></c:set>
	        <cpt:select id="registe_fund_money" key="money_type" value="${registe_fund_money_value}" onChange="initControlValue(this.id)"></cpt:select>
	        <input type="hidden" name="constructions/construction[0]/registe_fund_money_value" value="${registe_fund_money_value }" class="required" label="币种"/>
	      	<input type="hidden" name="constructions/construction[0]/registe_fund_money_name" value="<x:out select="$xmlData/data/constructions/construction[@submit_org='1']/registe_fund_money_name" />"/>
          </td>
          <td align="right"><span class="color_red">*</span>注册类型：</td>
          <td align="left" colspan="1" >
          	<c:set var="nature">{'id':'<x:out select="$xmlData/data/construction/nature_code" />','name':'<x:out select="$xmlData/data/construction/nature_name" />'}</c:set>
          	<cpt:tree key="nature_type" cacheable="false" className="hn_iuput_kuang " readonly="true" value="${nature}" label="注册类型"
          		id="nature" name="nature" showPattern="current" shieldPattern="0" topCheckbox="false" onClick="initTreeValue"/>
	        <input id="nature_code" type="hidden" name="construction/nature_code" class="required" label="注册类型" value="<x:out select="$xmlData/data/construction/nature_code" />"/>
            <input id="nature_name" type="hidden" name="construction/nature_name" value="<x:out select="$xmlData/data/construction/nature_name" />"/>
          </td>
	</tr>
	
	 <tr >
          <td align="right"><span class="color_red">*</span>风险投资情况：</td>
          <td colspan="1" align="left">
          	<c:set var="is_risk_invest_value"><x:out select="$xmlData/data/construction/is_risk_invest_value" /></c:set>
	        <cpt:select id="is_risk_invest" key="is_risk_invest" value="${is_risk_invest_value}" onChange="initControlValue(this.id);showOrHideInvest(this.value);" style="width:130px"></cpt:select>
	        <input type="hidden" name="construction/is_risk_invest_value" id="is_risk_invest_value" value="<x:out select="$xmlData/data/construction/is_risk_invest_value" />" class="required" label="风险投资情况"/>
	      	<input type="hidden" name="construction/is_risk_invest_name" value="<x:out select="$xmlData/data/construction/is_risk_invest_name" />"/>
          <td align="right"><span id="risk_invest_label"><span class="color_red">*</span>风险投资额：</span></td>
          <td colspan="1" align="left">         
            <input id="risk_invest" name="construction/risk_invest" type="text"  class=" required" label="风险投资额" size="8"
	       value="<x:out select="$xmlData/data/construction/risk_invest" />" onfocus="InitInput.setNumber(this,7,4,2)" style="text-align:right;"/>
	        <span id="risk_invest_wan">&nbsp;万&nbsp;</span>
	        <c:set var="risk_invest_money_value"><x:out select="$xmlData/data/construction/risk_invest_money_value" /></c:set>
	        <cpt:select id="risk_invest_money" key="money_type" value="${risk_invest_money_value}" onChange="initControlValue(this.id)"></cpt:select>
	        <input id="risk_invest_money_value" type="hidden" name="construction/risk_invest_money_value" value="<x:out select="$xmlData/data/construction/risk_invest_money_value" />" class="required" label="币种"/>
	      	<input type="hidden" name="construction/risk_invest_money_name" value="<x:out select="$xmlData/data/construction/risk_invest_money_name" />"/>
          </td>
      </tr>
      <tr >
          <td align="right"><span class="color_red">*</span>注册日期：</td>
          <td colspan="1" align="left">
          <c:set var="registe_date"><x:out select="$xmlData/data/construction/registe_date" /></c:set>
          <cpt:date id="registe_date" name="construction/registe_date" value="${registe_date}" className="hn_iuput_kuang required date beforeToday" label="注册日期" ></cpt:date>
		<td align="right"><span class="color_red">*</span>行业类型：</td>
		<td>
		<input name="constructions/construction[0]/belong_industry_name" label="行业类型" type="text" required class="input_css required " maxlength="100" value="<x:out select="$xmlData/data/constructions/construction[@submit_org='1']/belong_industry_name" />"/>
		</td>
	</tr>
	 <tr >
          <td align="right"><span class="color_red">*</span>母公司名称：</td>
          <td colspan="1" align="left"><span>
            <input name="construction/main_org_name" type="text" label="母公司名称" class="hn_iuput_kuang required" value="<x:out select="$xmlData/data/construction/main_org_name" />" maxlength="50"/>
            </span>
          </td>
           <td align="right"><span class="color_red">*</span>母公司地址：</td>
          <td colspan="1" align="left"><span>
            <input name="construction/main_org_addr" type="text" label="母公司地址" class="hn_iuput_kuang required" value="<x:out select="$xmlData/data/construction/main_org_addr" />" maxlength="50"/>
            </span>
          </td>
      </tr>
         <tr >
            <td align="right"><span class="color_red">*</span>开户银行：</td>
            <td align="left"><input id="bank_name" name="construction/bank_name" value="<x:out select='$xmlData/data/construction/bank_name' />" type="text"  class="hn_iuput_kuang required" label="开户银行"/></td>
          	<td align="right"><span class="color_red">*</span>银行信用等级：</td>
            <td align="left"><input id="credit_level" name="construction/credit_level" value="<x:out select='$xmlData/data/construction/credit_level' />" type="text"  class="hn_iuput_kuang required" label="银行信用等级"/></td>
          </tr>
          <tr>
            <td align="right"><span class="color_red">*</span>开户户名：</td>
            <td align="left"><input id="bank_orgname" type="text" name="construction/bank_orgname" value="<x:out select='$xmlData/data/construction/bank_orgname' />"  class="hn_iuput_kuang required" label="开户户名"/></td>
            <td align="right"><span class="color_red">*</span>银行账号：</td>
            <td align="left"><input id="bank_account" name="construction/bank_account" type="text" value="<x:out select='$xmlData/data/construction/bank_account' />"  class="hn_iuput_kuang required" maxlength="30" label="银行账号" onkeyup="setBankAccount(this);"/></td>
          </tr>
	  <tr>
		<td align="right"><span class="color_red">*</span>单位资质：</td>
		<td colspan="3">
		<input name="constructions/construction[0]/chk_authenticate_name" label="单位资质" type="text" required class="input_css required " maxlength="100" style="width: 725px;"  value="<x:out select="$xmlData/data/constructions/construction[@submit_org='1']/chk_authenticate_name" />"/>
		</td>
	  </tr>
	  <tr>
		<td align="right"><span class="color_red">*</span>主要产品和服务：</td>
		<td colspan="3">
		<input name="constructions/construction[0]/projectserve" label="主要产品和服务" type="text" required class="input_css required " maxlength="100" style="width: 725px;"  value="<x:out select="$xmlData/data/constructions/construction[@submit_org='1']/projectserve" />"/>
		</td>
	  </tr>
	  <tr>
		<td align="right"><span class="color_red">*</span>主要承建项目业绩：</td>
		<td colspan="3">
		<input name="constructions/construction[0]/performance" label="主要承建项目业绩" type="text" required class="input_css required " maxlength="100" style="width: 725px;"  value="<x:out select="$xmlData/data/constructions/construction[@submit_org='1']/performance" />"/>
		</td>
	  </tr>
	
</table>

<div class="t_bar">主承建单位人员情况</div>
<table class="t_css" width="100%" border="0" cellpadding="0"
	id="orgInfo2" cellspacing="1">
	<tr>
		<td align="right"><span class="color_red">*</span>法人代表：</td>
		<td>
		<input name="construction_persons/cname" label="法人代表" type="text" required class="input_css required " maxlength="100" value="<x:out select="$xmlData/data/construction_persons/cname" />"/>
		</td>
		<td align="right"><span class="color_red">*</span>证件类型：</td>
		<td>
		<c:set var="id_type_value"><x:out select="$xmlData/data/construction_persons/id_type_value" /></c:set>
	    <cpt:select key="id_type" id="id_type" name="id_type" value="${id_type_value}" onChange="initControlValue(this.id);setIdNoCheck(this.id);" style="width:130px"/>
	    <input type="hidden" name="construction_persons/id_type_value" id="id_type_value" class="required" label="证件类型" value="${id_type_value }"/>
	    <input type="hidden" name="construction_persons/id_type_name" value="<x:out select="$xmlData/data/construction_persons/id_type_name" />" /></td>
		<td align="right"><span class="color_red">*</span>证件号码：</td>
		<td>
		<input name="construction_persons/id_no" id="id_no" label="证件号码" type="text" required class="input_css required " maxlength="100" value="<x:out select="$xmlData/data/construction_persons/id_no" />"/>
		</td>
	</tr>
		<tr>
		<td align="right" rowspan="2"><span class="color_red">*</span>员工人数：</td>
		<td rowspan="2">
		<input name="construction_persons/people_count_total" id="people_count_total" label="员工人数" onchange="setPre();" type="text" style="text-align: right" onfocus="InitInput.setNumber(this,9,0,0)" class="input_css required " value="<x:out select="$xmlData/data/construction_persons/people_count_total"/>"/>
		</td>
		<td align="right" ><span class="color_red">*</span>其中：直接从事研发人员数：</td>
		<td>
		<input name="construction_persons/job_yanfa" id="job_yanfa" label="其中：直接从事研发人员数" onchange="setPre();" type="text" style="text-align: right" onfocus="InitInput.setNumber(this,9,0,0)" class="input_css required valueGreatEqual:people_count_total:job_yanfa" value="<x:out select="$xmlData/data/construction_persons/job_yanfa"/>"/>
		</td>
		<td align="right"><span class="color_red">*</span>占员工总数比例%：</td>
		<td >
		<input name="construction_persons/proportion1" id="proportion1" label="占员工总数比例" type="text" style="text-align: right" onfocus="InitInput.setNumber(this,9,2,2)" class="input_css gray "  disabled  value="<x:out select="$xmlData/data/construction_persons/proportion1"/>"/>
		</td>
	</tr>
	<tr>
	<td align="right" ><span class="color_red">*</span>其中：本科以上研发人员数：</td>
		<td>
		<input name="construction_persons/bachelor_up" id="bachelor_up" label="其中：本科以上研发人员数" onchange="setPre();" type="text" style="text-align: right" onfocus="InitInput.setNumber(this,9,0,0)" class="input_css required valueGreatEqual:people_count_total:bachelor_up" value="<x:out select="$xmlData/data/construction_persons/bachelor_up"/>"/>
		</td>
		<td align="right"><span class="color_red">*</span>占员工总数比例%：</td>
		<td>
		<input name="construction_persons/proportion2" id="proportion2" label="占员工总数比例" type="text" style="text-align: right" onfocus="InitInput.setNumber(this,9,2,2)" class="input_css gray "  disabled value="<x:out select="$xmlData/data/construction_persons/proportion2"/>"/>
		</td>
	</tr>
</table>
<div class="t_bar">主承建单位近三年主要财务情况</div>
<table class="t_css" width="100%" border="0" cellpadding="0" id="orgInfo3" cellspacing="1">
	     <tr align="center" >
	            <th width="20%">指标</th>
				<th width="20%">${year-3 }年</th>
				<th width="20%">${year-2 }年</th>
				<th width="20%">${year-1 }年</th>
				<th width="20%">平均增长率（%）</th>
		 </tr>
		 <tr align="center">
		 <td><span class="color_red">*</span>年末总资产</td>
		 <td><input name="finances/assets1" label="${year-3 }年年末总资产" type="text" style="text-align: right" onfocus="InitInput.setNumber(this,9,4,2)" class="input_css required " value="<x:out select="$xmlData/data/finances/assets1"/>"/></td>
		 <td><input name="finances/assets2" label="${year-2 }年年末总资产" type="text" style="text-align: right" onfocus="InitInput.setNumber(this,9,4,2)" class="input_css required " value="<x:out select="$xmlData/data/finances/assets2"/>"/></td>
		 <td><input name="finances/assets3" label="${year-1 }年年末总资产" type="text" style="text-align: right" onfocus="InitInput.setNumber(this,9,4,2)" class="input_css required " value="<x:out select="$xmlData/data/finances/assets3"/>"/></td>
		 <td><input name="finances/assets_pre" label="年末总资产的平均增长率" type="text" style="text-align: right" onfocus="InitInput.setNumber(this,9,2,2,null,true)" class="input_css required " value="<x:out select="$xmlData/data/finances/assets_pre"/>"/></td>
		 </tr>
		 <tr align="center">
		 <td><span class="color_red">*</span>净资产</td>
		 <td><input name="finances/net_asset1" label="${year-3 }年净资产" type="text" style="text-align: right" onfocus="InitInput.setNumber(this,9,4,2)" class="input_css required " value="<x:out select="$xmlData/data/finances/net_asset1"/>"/></td>
		 <td><input name="finances/net_asset2" label="${year-2 }年净资产" type="text" style="text-align: right" onfocus="InitInput.setNumber(this,9,4,2)" class="input_css required " value="<x:out select="$xmlData/data/finances/net_asset2"/>"/></td>
		 <td><input name="finances/net_asset3" label="${year-1 }年净资产" type="text" style="text-align: right" onfocus="InitInput.setNumber(this,9,4,2)" class="input_css required " value="<x:out select="$xmlData/data/finances/net_asset3"/>"/></td>
		 <td><input name="finances/net_asset_pre" label="净资产的平均增长率" type="text" style="text-align: right" onfocus="InitInput.setNumber(this,9,2,2,null,true)" class="input_css required " value="<x:out select="$xmlData/data/finances/net_asset_pre"/>"/></td>
		 </tr>
		 <tr align="center">
		 <td><span class="color_red">*</span>销售收入</td>
		 <td><input name="finances/sales1" label="${year-3 }年销售收入" type="text" style="text-align: right" onfocus="InitInput.setNumber(this,9,4,2)" class="input_css required " value="<x:out select="$xmlData/data/finances/sales1"/>"/></td>
		 <td><input name="finances/sales2" label="${year-2 }年销售收入" type="text" style="text-align: right" onfocus="InitInput.setNumber(this,9,4,2)" class="input_css required " value="<x:out select="$xmlData/data/finances/sales2"/>"/></td>
		 <td><input name="finances/sales3" label="${year-1 }年销售收入" type="text" style="text-align: right" onfocus="InitInput.setNumber(this,9,4,2)" class="input_css required " value="<x:out select="$xmlData/data/finances/sales3"/>"/></td>
		 <td><input name="finances/sales_pre" label="销售收入的平均增长率" type="text" style="text-align: right" onfocus="InitInput.setNumber(this,9,2,2,null,true)" class="input_css required " value="<x:out select="$xmlData/data/finances/sales_pre"/>"/></td>
		 </tr>
		 <tr align="center">
		 <td><span class="color_red">*</span>利润总额</td>
		 <td><input name="finances/total_profit1" label="${year-3 }年利润总额" type="text" style="text-align: right" onfocus="InitInput.setNumber(this,9,4,2)" class="input_css required " value="<x:out select="$xmlData/data/finances/total_profit1"/>"/></td>
		 <td><input name="finances/total_profit2" label="${year-2 }年利润总额" type="text" style="text-align: right" onfocus="InitInput.setNumber(this,9,4,2)" class="input_css required " value="<x:out select="$xmlData/data/finances/total_profit2"/>"/></td>
		 <td><input name="finances/total_profit3" label="${year-1 }年利润总额" type="text" style="text-align: right" onfocus="InitInput.setNumber(this,9,4,2)" class="input_css required " value="<x:out select="$xmlData/data/finances/total_profit3"/>"/></td>
		 <td><input name="finances/total_profit_pre" label="利润总额的平均增长率" type="text" style="text-align: right" onfocus="InitInput.setNumber(this,9,2,2,null,true)" class="input_css required " value="<x:out select="$xmlData/data/finances/total_profit_pre"/>"/></td>
		 </tr>
		 <tr align="center">
		 <td><span class="color_red">*</span>税收总额</td>
		 <td><input name="finances/total_fax1" label="${year-3 }年税收总额" type="text" style="text-align: right" onfocus="InitInput.setNumber(this,9,4,2)" class="input_css required " value="<x:out select="$xmlData/data/finances/total_fax1"/>"/></td>
		 <td><input name="finances/total_fax2" label="${year-2 }年税收总额" type="text" style="text-align: right" onfocus="InitInput.setNumber(this,9,4,2)" class="input_css required " value="<x:out select="$xmlData/data/finances/total_fax2"/>"/></td>
		 <td><input name="finances/total_fax3" label="${year-1 }年税收总额" type="text" style="text-align: right" onfocus="InitInput.setNumber(this,9,4,2)" class="input_css required " value="<x:out select="$xmlData/data/finances/total_fax3"/>"/></td>
		 <td><input name="finances/total_fax_pre" label="税收总额的平均增长率" type="text" style="text-align: right" onfocus="InitInput.setNumber(this,9,2,2,null,true)" class="input_css required " value="<x:out select="$xmlData/data/finances/total_fax_pre"/>"/></td>
		 </tr>
		 <tr align="center">
		 <td><span class="color_red">*</span>创汇总额</td>
		 <td><input name="finances/total_forex1" label="${year-3 }年创汇总额" type="text" style="text-align: right" onfocus="InitInput.setNumber(this,9,4,2)" class="input_css required " value="<x:out select="$xmlData/data/finances/total_forex1"/>"/></td>
		 <td><input name="finances/total_forex2" label="${year-2 }年创汇总额" type="text" style="text-align: right" onfocus="InitInput.setNumber(this,9,4,2)" class="input_css required " value="<x:out select="$xmlData/data/finances/total_forex2"/>"/></td>
		 <td><input name="finances/total_forex3" label="${year-1 }年创汇总额" type="text" style="text-align: right" onfocus="InitInput.setNumber(this,9,4,2)" class="input_css required " value="<x:out select="$xmlData/data/finances/total_forex3"/>"/></td>
		 <td><input name="finances/total_forex_pre" label="创汇总额的平均增长率" type="text" style="text-align: right" onfocus="InitInput.setNumber(this,9,2,2,null,true)" class="input_css required " value="<x:out select="$xmlData/data/finances/total_forex_pre"/>"/></td>
		 </tr>
		 <tr align="center">
		 <td><span class="color_red">*</span>研发投入</td>
		 <td><input name="finances/research1" label="${year-3 }年研发投入" type="text" style="text-align: right" onfocus="InitInput.setNumber(this,9,4,2)" class="input_css required " value="<x:out select="$xmlData/data/finances/research1"/>"/></td>
		 <td><input name="finances/research2" label="${year-2 }年研发投入" type="text" style="text-align: right" onfocus="InitInput.setNumber(this,9,4,2)" class="input_css required " value="<x:out select="$xmlData/data/finances/research2"/>"/></td>
		 <td><input name="finances/research3" label="${year-1 }年研发投入" type="text" style="text-align: right" onfocus="InitInput.setNumber(this,9,4,2)" class="input_css required " value="<x:out select="$xmlData/data/finances/research3"/>"/></td>
		 <td><input name="finances/research_pre" label="研发投入的平均增长率" type="text" style="text-align: right" onfocus="InitInput.setNumber(this,9,2,2,null,true)" class="input_css required " value="<x:out select="$xmlData/data/finances/research_pre"/>"/></td>
		 </tr>
		 <tr >
		 <td align="center"><span class="color_red">*</span>备注</td>
		 <td colspan="4"><input name="finances/remark" label="备注" type="text" style="width: 725px;" maxlength="100" class="input_css required " value="<x:out select="$xmlData/data/finances/remark"/>"/></td>
		 </tr>
</table>

<script type="text/javascript">
$(function(){
	showOrHideInvest($("#is_risk_invest_value").val());
	setOrgName();
});
function setBankAccount(obj){
	bankAccount = $(obj).val();
	$(obj).val(bankAccount.replace(/[^0-9]/g,''));
}
function setIdNoCheck(id) {
	var id_value = $("#"+id+"value").val();
	if(id_value == 1){
		$("#id_no").addClass("idCard");
	}else{
		$("#id_no").removeClass("idCard");
	}
}

function showOrHideInvest(val){
	var isRiskInvest = val;
	if(isRiskInvest == "01"){
		$("#risk_invest_label").show();
		$("#risk_invest").show();
		$("#risk_invest_money").show();
		$("#risk_invest_wan").show();
		$("#risk_invest").addClass("required");
		$("#risk_invest_money_value").addClass("required");
	}else{
		$("#risk_invest_label").hide();
		$("#risk_invest").hide();
		$("#risk_invest_money").hide();
		$("#risk_invest_wan").hide();
		$("#risk_invest").val("");
		$("#risk_invest_money").val("");
		$("#risk_invest").removeClass("required");
		$("#risk_invest_money_value").removeClass("required");
	}
}

function setPre(){
	var people_count_total = $("#people_count_total").val();
	if(people_count_total=='' || people_count_total == 0){
		$("#proportion1").val("0.00");
		$("#proportion2").val("0.00");
	}else{
		$("#proportion1").val(formatVal(($("#job_yanfa").val()/people_count_total)*100));
		$("#proportion2").val(formatVal(($("#bachelor_up").val()/people_count_total)*100));
	}
}
function setOrgName(){
	$("#zcddw").text($("#corgName").val());
}
</script>